<%@ page language="java" contentType="text/html; charset=EUC-KR"
    pageEncoding="EUC-KR"%>
<%@ page import="java.sql.*,java.util.*,init.*,com.skku.selab.erp.db.sql.*,com.skku.selab.erp.*"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<%@page import="com.skku.selab.erp.job.schduler"%><html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=EUC-KR">
<title>Insert title here</title>
</head>
<body>
<%
	DBConnectionMgr pool = null;
	Connection con = null;
    PreparedStatement pstmt = null;
    ResultSet rs = null;
    
    //erpDBQueries erp = new erpDBQueries();
    
	try {	    
		Properties props = new Properties();
        
		out.println("<p>Start<p>");
	
		props.put("user", "root");
	    props.put("password", "7220");
        
        con = DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/gache?useUnicode=true&characterEncoding=EUC_KR", props);
                   
        //pstmt = con.prepareStatement("select * from employee");
        //ResultSet rs = pstmt.executeQuery();		
        //while (rs.next()) {
        //	out.println("ID:"+rs.getString("USER_ID"));
		//}	

        rs = DefaultQueries.executeQuery(con, "select * from employee");
        while(rs.next()){
        	out.println( "<p>" + rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3));
        }
        out.println("<p>");
        
        schduler.setSchduler(con, true);
        
        //DML.updateTable(con, "product", "price = 50000", "price = 5000 AND prdtName = \"Pearl\"");
        //if( TCL.savepoint(con, "A") != null )
        //	out.println("Done<p>");
        
        
        
        //DML.insertInto(con, "product", "(2, 'Silver', 10000)");
        
        //rs = DML.update(con, "employee", "name = \"KimJunhee2\"", "idEmployee = 1");
        //rs = DefaultQueries.executeAnyQuery(con, "update employee)
        //rs = DefaultQueries.executeAnyQuery(con, "select * from employee");
        //while(rs.next()){
        //	out.println( "<p>" + rs.getString(1) + " " + rs.getString(2) + " " + rs.getString(3));
        //}
        //out.println("<p>");
        
        
        
        //rs = DefaultQueries.executeAnyQuery(con, "select * from employee");
        //ResultSetMetaData rsmd = rs.getMetaData();
        //out.println("<p>colums : " + rsmd.getColumnCount());
        //while(rs.next()){
        	
        //}        
	}	catch(Exception ex)	{
		System.out.println("Exception" + ex);
	}	finally	{
		//con.close();
	}
	out.println("<p>End<p>");
%>
</body>
</html>